package com.common.exception;
 

/**
 * UI层异常处理
 * 
 * @author fitch
 * @createtime 2012-12-14 下午5:25:28
 * @version 1.0
 */
public class UIException extends BaseException {

	private static final long serialVersionUID = 1L;

	// 默认构造函数
	public UIException() {
		super();
	}

	public UIException(Exception e) {
		if (e instanceof BaseException) {
			this.setSuperException((BaseException) e);
		} else {
			setException(e);
			setErrorLevel(UILEVEL);
			setDetailMessage(UIERRORINFO); 
			e.printStackTrace();
		}
	}

	public UIException(Exception e, String className) {
		if (e instanceof BaseException) {
			this.setSuperException((BaseException) e);
		} else {
			setException(e);
			setErrorLevel(UILEVEL);
			setDetailMessage(UIERRORINFO);e.printStackTrace();
		}
	}

	public UIException(Exception e, Class<?> c) {
		if (e instanceof BaseException) {
			this.setSuperException((BaseException) e);
		} else {
			setException(e);
			setErrorLevel(UILEVEL);
			setDetailMessage(UIERRORINFO);e.printStackTrace();
		}
	}

}
